﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University.Workshop.Model
{
    public class UserLogOn
    {
        private static UserLogOn instance;

        private string name;
        private string surname1;
        private string surname2;
        private string address;
        private string id;
        private int telephone;
        private int cellular;
        private string occupation;
        private DateTime dateTimeEnter;

        public UserLogOn()
        {
            this.name = null;
            this.surname1 = null;
            this.surname2 = null;
            this.address = null;
            this.id = null;
            this.telephone = 0;
            this.cellular = 0;
            this.occupation = null;
            this.dateTimeEnter = DateTime.Now;
        }

        //Singletone
        public static UserLogOn Instance {

            get {
                if (instance == null)
                {
                    instance = new UserLogOn();
                }
                return instance;
            }
        }

        public string Name { get{return this.name;} set{this.name = value;} }
        //public string GetName() {  }
        public string Surname1 { get { return this.surname1; } set { this.surname1 = value; } }
        //public string GetSurname1() { return this.surname1; }
        public string Surname2 { get { return this.surname2; } set { this.surname2 = value; } }
        //public string GetSurname2() { return this.surname2; }
        public string Address { get { return this.address; } set { this.address = value; } }
        //public string GetAddress() { return this.address; }
        public string Id { get{ return this.id; } set { this.id = value; } }
        //public string GetId() { return this.id; }
        public int Telephone { get { return this.telephone; } set { this.telephone = value; } }
        //public int GetTelephone() { return this.telephone; }
        public int Cellular { get { return this.cellular; } set { this.cellular = value; } }
        //public int GetCellular() { return this.cellular; }
        public string Occupation { get { return this.occupation; } set { this.occupation = value; } }
        //public string GetOccupation() { return this.occupation; }
        public DateTime DateTimeEnter { get { return this.dateTimeEnter; } set { this.dateTimeEnter = value; } }
        //public DateTime GetDateTime() { return this.dateTimeEnter; }

        /*public void Reset()
        {
            instance = null;
        }*/
    }
}
